<%@ include file="/common/taglibs.jsp"%>
<%@ taglib prefix="image" tagdir="/WEB-INF/tags/product"%>
<title><fmt:message key="carrierDetail.title" />
</title>
<probiz:showBindErrors bindPath="carrier.*" />

<content tag="buttons">
<probiz:iconBtn btnType="save" onclick="return fnDoSave(this);" />
<c:if test="${carrier.carrierId!=null}">
	<probiz:iconBtn btnType="delete" onclick="fnDoDelete(this)" />
</c:if>
<probiz:iconBtn btnType="back" url="${ctxPath }/system/carrier.html" />
</content>




<c:set var="rootPath">
	<c:url value="/" />
</c:set>
<div class="top clearfix">
	<ul class="tab">
		<li class="curr">
			<span><fmt:message key="carrier.title" />
			</span>
		</li>
	</ul>
</div>
<div class="modify">
	<form class="mainForm" method="post" id="carrier" name="carrier"
		action="<c:url value="/system/carrier.html"/>" onsubmit="return validateCarrier(this);">
		<input type="hidden" name="version" value="${carrier.version}" />
		<input type="hidden" name="carrierId" value="${carrier.carrierId}" />
		<input type="hidden" name="from" value="${param.from}" />
		<div class="box-content-wrap">
			<div class="box-content">
				<div class="content">
					<table class="com_modi_table" cellSpacing=0 cellPadding=0 width="100%" border=0>
						<tr>
							<th colspan="2" class="title">
								<h4>
									<fmt:message key="carrier.group.basic" />
								</h4>
							</th>
						</tr>
						<tr>
							<th class="label_width_1">
								<StoreAdmin:label key="carrier.carrierName" />
							</th>
							<td>
								<spring:bind path="carrier.carrierName">
									<input type="text" class="inputtxt" size="30" style="width: 350px"
										name="<c:out value="${status.expression}"/>" id="<c:out value="${status.expression}"/>"
										value="<c:out value="${status.value}"/>" />
									<span class="fieldError"><c:out value="${status.errorMessage}" /> </span>
								</spring:bind>
							</td>
						</tr>
						<tr>
							<th>
								<StoreAdmin:label key="carrier.websiteUrl" />
							</th>
							<td>
								<spring:bind path="carrier.websiteUrl">
									<input type="text" class="form-inputbox inputtxt"  style="width: 350px"
										name="<c:out value="${status.expression}"/>" id="<c:out value="${status.expression}"/>"
										value="<c:out value="${empty status.value?'http://':status.value}"/>" />
									<span class="fieldError"><c:out value="${status.errorMessage}" /> </span>
								</spring:bind>
							</td>
						</tr>
						<tr>
							<th class="label_width_1">
								<StoreAdmin:label key="carrier.linkman" />
							</th>
							<td>
								<spring:bind path="carrier.linkman">
									<input type="text" class="form-inputbox inputtxt" size="30" style="width: 350px"
										name="<c:out value="${status.expression}"/>" id="<c:out value="${status.expression}"/>"
										value="<c:out value="${status.value}"/>" />
									<span class="fieldError"><c:out value="${status.errorMessage}" /> </span>
								</spring:bind>
							</td>
						</tr>

						<tr>
							<th>
								<StoreAdmin:label key="carrier.telephone" />
							</th>
							<td>
								<spring:bind path="carrier.telephone">
									<input type="text" class="form-inputbox inputtxt" size="30" style="width: 350px"
										name="<c:out value="${status.expression}"/>" id="<c:out value="${status.expression}"/>"
										value="<c:out value="${status.value}"/>" />
									<span class="fieldError"><c:out value="${status.errorMessage}" /> </span>
								</spring:bind>
							</td>
						</tr>
						<tr>
							<th>
								<StoreAdmin:label key="carrier.fax" />
							</th>
							<td>
								<spring:bind path="carrier.fax">
									<input type="text" class="form-inputbox inputtxt" size="30" style="width: 350px"
										name="<c:out value="${status.expression}"/>" id="<c:out value="${status.expression}"/>"
										value="<c:out value="${status.value}"/>" />
									<span class="fieldError"><c:out value="${status.errorMessage}" /> </span>
								</spring:bind>
							</td>
						</tr>

						<tr>
							<th>
								<StoreAdmin:label key="carrier.email" />
							</th>
							<td>
								<spring:bind path="carrier.email">
									<input type="text" class="inputtxt" size="30" style="width: 350px"
										name="<c:out value="${status.expression}"/>" id="<c:out value="${status.expression}"/>"
										value="<c:out value="${status.value}"/>" />
									<span class="fieldError"><c:out value="${status.errorMessage}" /> </span>
								</spring:bind>
							</td>

						</tr>
						<tr>
							<th>
								<StoreAdmin:label key="carrier.zip" />
							</th>

							<td>
								<spring:bind path="carrier.zip">
									<input type="text" class="form-inputbox inputtxt" size="30" style="width: 350px"
										name="<c:out value="${status.expression}"/>" id="<c:out value="${status.expression}"/>"
										value="<c:out value="${status.value}"/>" />
									<span class="fieldError"><c:out value="${status.errorMessage}" /> </span>
								</spring:bind>
							</td>
						</tr>

						<tr>
							<th>
								<fmt:message key="carrier.transportComIcon" />
							</th>
							<td>

								<img id="logoImage" src="${mediaPath}${carrier.logo}"
									onerror="$j(this).attr('originsrc',this.src);this.onerror='';this.src=__defaultImage_brand"
									originsrc="" height="55" width="75" />
								(
								<fmt:message key="carrier.transportComIconTips" />
								)
								<br />
								<input type="hidden" id="logo" name="logo" value="${carrier.logo}" />
								<probiz:plugin_upload fileInputId="logo" uploadFileTypes="jpg"
									onComplete="fnUploadImagehandler" />
							</td>
						</tr>
						<tr>
							<th>
								<StoreAdmin:label key="carrier.companyAddress" />
							</th>
							<td colspan="3">
								<spring:bind path="carrier.carrierAddress">
									<input type="text" class="form-inputbox inputtxt" size="30" style="width: 350px"
										name="<c:out value="${status.expression}"/>" id="<c:out value="${status.expression}"/>"
										value="<c:out value="${status.value}"/>" size="60" />
									<span class="fieldError"><c:out value="${status.errorMessage}" /> </span>
								</spring:bind>
							</td>
						</tr>
						<tr>
							<th>
								<StoreAdmin:label key="carrier.companyAddress2" />
							</th>
							<td colspan="3">
								<spring:bind path="carrier.carrierAddress2">
									<input class="form-inputbox inputtxt" name="<c:out value="${status.expression}"/>"
										type="text" size="30" style="width: 350px" id="<c:out value="${status.expression}"/>"
										value="<c:out value="${status.value}"/>" size="60" />
									<span class="fieldError"><c:out value="${status.errorMessage}" /> </span>
								</spring:bind>
							</td>
						</tr>
						
						<c:if test="${appConfig.kuaidi100Type != 0}">
							<tr>
								<th>
									<StoreAdmin:label key="carrier.carrierCode" />
								</th>
								<td>
									<input type="text" name="carrierCode" id="carrierCode" value="${carrier.carrierCode}" style="width:350px" class="inputtxt"/>
									&nbsp;&nbsp;<fmt:message key="carrier.carrierCode.tip" />
								</td>
							</tr>
						</c:if>
			
			
						
						<input type="hidden" name="status" value="1"/>
					</table>
				</div>
			</div>
		</div>
	</form>
</div>
<v:javascript formName="carrier" staticJavascript="false" />

<c:set var="plugin_upload" value="true" scope="request" />

<script type="text/javascript">
function fnUploadImagehandler(mediaUrl){
	$j("#logoImage").get(0).src=__mediaPath+mediaUrl;
}
</script>